#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

bool isPalindrome(int x) {
    cout<<x<<endl;
    if(x<0||(x%10==0&&x!=0)){return false;}
    int top=0,result=0,y=x;
    do{
        top=y%10;
        y=y/10;
        if(result>INT_MAX/10||result==INT_MAX/10&&top>7)return false;
        result=result*10+top;
    }while(y!=0);
    return result==x;
}

int main(){
    cout<<isPalindrome(0)<<endl;
    cout<<INT_MAX<<","<<INT_MIN<<endl;
    return 0;
}